package j2024.j202408;

import java.util.Arrays;
import java.util.Scanner;

public class j0808 {
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        long[] arr = new long[n];
        long max = 0;
        for (int i = 0; i < n; i++) {
            arr[i] = in.nextLong();
            max = Math.max(max,arr[i]);
        }
        boolean out = true;
        for (int i = 0; i < n; i++) {
            if(max*2%arr[i]!=0){
                out = false;
                break;
            }
        }
        if(out){
            System.out.println("YES");
        }else {
            System.out.println("NO");
        }
    }

    public static void main2(String[] args) {
            Scanner in = new Scanner(System.in);
            int v = in.nextInt();
            int n = in.nextInt();
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = in.nextInt();
            }
            Arrays.sort(arr);
            int i = n-1;
            while(v>0 && i>=0){
                if(v-arr[i]<0){
                    i--;
                }else {
                    v-=arr[i];
                    i--;
                }
            }
            System.out.println(v);
    }

    public static void main(String[] args) {
        Scanner in =new Scanner(System.in);
        String a = in.next();
        String b = in.next();
        System.out.println(b.length()-a.length());
    }
}
class leet08_1{
    /**
     * 面试题 08.01. 三步问题
     * @param n
     * @return
     */
    public int waysToStep(int n) {
        long[] dp = new long[n+1];
        if(n<3){
            switch (n){
                case 1:return 1;
                case 2:return 2;
                case 3:return 4;
            }
        }
        dp[1] = 1;dp[2] = 2;dp[3] = 4;
        for (int i = 4; i <= n; i++) {
            dp[i] = (dp[i-1]+dp[i-2]+dp[i-3])%1000000007;
        }
        return (int)dp[n];
    }

    /**
     * 860. 柠檬水找零
     * @param bills
     * @return
     */
    public boolean lemonadeChange(int[] bills) {
        int five = 0,ten = 0;
        for (int i = 0; i < bills.length; i++) {
            if(bills[i]==5){
                five++;
            }else if(bills[i]==10){
                if(five==0){
                    return false;
                }else {
                    five--;
                }
                ten++;
            }else {
                if(five==0){
                    return false;
                }else if(five<3&&ten==0){
                    return false;
                }
                if(ten!=0){
                    ten--;
                    five--;
                }else {
                    five-=3;
                }

            }
        }
        return true;
    }

    /**
     * 746. 使用最小花费爬楼梯
     * @param cost
     * @return
     */
    public int minCostClimbingStairs1(int[] cost) {
        int[] dp = new int[cost.length+1];
        for (int i = 2; i <= cost.length; i++) {
            dp[i] = Math.min(dp[i-1]+cost[i-1],dp[i-2]+cost[i-2]);
        }
        return dp[cost.length];
    }
    public int minCostClimbingStairs(int[] cost) {
        int n = cost.length;
        int[] dp  =new int[n];
        dp[n-1] = cost[n-1];
        dp[n-2] = cost[n-2];
        for (int i = n-3; i >=0 ; i--) {
            dp[i] = cost[i]+Math.min(dp[i+1],dp[i+2]);
        }
        return Math.min(dp[0],dp[1]);
    }
}
